package com.hca.training.zk.javabasic.designModel.cn.zhang.Test3;

/**
 * 单例模式：保证类在内存中只有一个
 *
 */
public class Test {
    public static  void  main(String[] arg0)
    {
     Students students=Students.getS();
     Students students1=Students.getS();
        System.out.println(students == students1);
        Teacher teacher=Teacher.getT();
        Teacher teacher1=Teacher.getT();
        System.out.println(teacher == teacher1);
        System.out.println(teacher);
    }
}
